/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package de.editura.common.swing.imageviewer;

import java.awt.event.ComponentEvent;
import java.awt.event.ComponentListener;

/**
 *
 * @author kschmidtner
 */
public class ImageViewerCListener implements ComponentListener{

    ImageViewerPanel imgP = null;
    int evtCounter = 0;

    public ImageViewerCListener(ImageViewerPanel imgP) {
        this.imgP = imgP;
    }


    public void componentResized(ComponentEvent e) {
        imgP.getImgCanvasSizeTF().setText("H: " + imgP.getImageCanvas().getHeight()
                + " - B: " + imgP.getImageCanvas().getWidth()
                + " - evtC: " + evtCounter++);
    }

    public void componentMoved(ComponentEvent e) {
       // throw new UnsupportedOperationException("Not supported yet.");
    }

    public void componentShown(ComponentEvent e) {
       // throw new UnsupportedOperationException("Not supported yet.");
    }

    public void componentHidden(ComponentEvent e) {
       // throw new UnsupportedOperationException("Not supported yet.");
    }

}
